package cn.edu.nwsuaf.examcenter.service.serviceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

import cn.edu.nwsuaf.examcenter.pojo.StudentExamInfo;
import cn.edu.nwsuaf.examcenter.pojo.StudentExamInfoId;
import cn.edu.nwsuaf.examcenter.service.StudentExamService;

@Service(value="studentExamService")
public class StudentExamServiceImpl extends BaseServiceImpl<StudentExamInfo> implements StudentExamService {

	@Override
	public void addStudentExam(String examPaperNo, List<String> studentNo) {
		// TODO Auto-generated method stub
		for(String s:studentNo){
			StudentExamInfo studentExamInfo = new StudentExamInfo();
			StudentExamInfoId id = new StudentExamInfoId();
			id.setExamPaperNo(examPaperNo);
			id.setStudentNo(s);
			
			studentExamInfo.setId(id);
			studentExamInfo.setIsMarked(0);
			
			super.saveData(studentExamInfo);
		}
	}

}
